/** 
 * Copyright (C), 2010-2012, TIETIAO Software Co.,Ltd. ALL RIGHTS RESERVED. 
 * File name:CommodityConstants.java
 * Version:1.0
 * Date:2012-1-4
 * Description: 商品常用类
 * author:zhijian.zhang
 */
package com.tietiao.common.constants;

import com.tietiao.common.util.PropertyUtil;
import com.tietiao.common.util.StringUtil;

public class CommodityConstants {

	public static int QIETU_ONE_WIDTH = 0;

	public static int QIETU_ONE_HEIGHT = 0;

	public static int QIETU_TWO_HEIGHT = 0;

	public static int QIETU_TWO_WIDTH = 0;
	
	public static final String ROOT_FILE_PATH = PropertyUtil.getValue("COMMODITY_PIC_ROOT_PATH");

	static {
		String[] qietuOne = PropertyUtil.getValue("COMMODITY_QIETU_ONE").split(
				"\\*");
		QIETU_ONE_WIDTH = Integer.parseInt(qietuOne[0]);
		QIETU_ONE_HEIGHT = Integer.parseInt(qietuOne[1]);

		String qietuTwo = PropertyUtil.getValue("COMMODITY_QIETU_TWO");
		if (StringUtil.checkStrIsNotNull(qietuTwo)) {
			String[] qietuTwoArr = PropertyUtil.getValue("COMMODITY_QIETU_TWO")
					.split("\\*");
			QIETU_TWO_WIDTH = Integer.parseInt(qietuTwoArr[0]);
			QIETU_TWO_HEIGHT = Integer.parseInt(qietuTwoArr[1]);
		}
	}

}
